package cn.itcast.demo.service;

import cn.itcast.demo.mapper.UserMapper;
import cn.itcast.demo.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: taft
 * @Date: 2018-12-6 11:53
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;


    public User queryUserById(Long id) {


        return userMapper.selectByPrimaryKey(id);
    }

    @Transactional
    public void deleteUserById(Long id){
        //this.userMapper.deleteUserById(id);
    }
}
